<?php echo $this->fetch('header.html'); ?>
<div class="main">
  <?php echo $this->fetch('header.common.html'); ?>
  <div class="layerbox_kuan">
  
  <a href="index.php?app=my_address&act=add<?php if ($_GET['for_cart']): ?>&for_cart=<?php echo $_GET['for_cart']; ?><?php endif; ?>" style="line-height:30px;color:#00F; display:block">新增收货地址+</a>
  <?php $_from = $this->_var['addresses']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'address');if (count($_from)):
    foreach ($_from AS $this->_var['address']):
?>
  <div class="layerbox">
    <div class="layerbox-head">
    <ul>
      <li style="width:90px">
    <?php if ($_GET['for_cart']): ?>
    <a href="index.php?app=my_address&act=set&addr_id=<?php echo $this->_var['address']['addr_id']; ?><?php if ($_GET['for_cart']): ?>&for_cart=<?php echo $_GET['for_cart']; ?><?php endif; ?>"><span>使用该地址</span></a>
    <?php else: ?>
      <?php if ($this->_var['address']['default_use'] == 1): ?>默认地址<?php else: ?><a href="index.php?app=my_address&act=set&addr_id=<?php echo $this->_var['address']['addr_id']; ?>"><span>设为默认</span></a><?php endif; ?>
    <?php endif; ?>
      </li>
      <li style="width:80px"><a href="index.php?app=my_address&act=edit&addr_id=<?php echo $this->_var['address']['addr_id']; ?><?php if ($_GET['for_cart']): ?>&for_cart=<?php echo $_GET['for_cart']; ?><?php endif; ?>">修改</a></li>
      <li style="width:80px"><?php if ($this->_var['address']['default_use'] != 1): ?><a href="index.php?app=my_address&act=drop&addr_id=<?php echo $this->_var['address']['addr_id']; ?><?php if ($_GET['for_cart']): ?>&for_cart=<?php echo $_GET['for_cart']; ?><?php endif; ?>" onclick="javascript:return confirm('确定要删除此收货地址吗?');">删除</a><?php endif; ?></li>
    </ul><i></i></div>
    <div class="layerbox-text"><font>姓名：</font><?php echo $this->_var['address']['consignee']; ?>&nbsp;&nbsp;<font>电话：</font><?php echo $this->_var['address']['phone_mob']; ?><br />
    <font>地址：</font><?php echo str_replace('//', ' ', $this->_var['address']['txt_countrys']); ?>&nbsp;<?php echo $this->_var['address']['address']; ?>
    </div>
  </div>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </div>  
<?php echo $this->fetch('footer.html'); ?>
</div>
</body>
</html>